﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using WCFMINERP.Contracts.DataContracts;

namespace WCFMINERP.Contracts.InterFaces
{
    [ServiceContract]
    public interface ILatticePartition
    {
        /// <summary>
        /// 根据工厂id获取格子分区
        /// </summary>
        /// <param name="oupshopid"></param>
        /// <returns></returns>
        [OperationContract]
        List<LatticePartition> GetLatticePartitionList(int oupshopid);

        /// <summary>
        /// 根据工厂id获取格子分区
        /// </summary>
        /// <param name="oupshopid"></param>
        /// <returns></returns>
        [OperationContract]
        LatticePartition GetLatticePartitionModel(int oupshopid,int pid);

        /// <summary>
        /// 添加一条格子分区记录
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
        [OperationContract]
        int AddLatticePartition(LatticePartition models);

        /// <summary>
        /// 删除一条格子分区记录
        /// </summary>
        /// <param name="Pid"></param>
        /// <returns></returns>
        
         [OperationContract]
        int DeleteLatticePartition(int Pid);

        /// <summary>
        /// 修改一条格子分区记录
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
        
         [OperationContract]
        int UpdateLatticePartition(LatticePartition models);

        /// <summary>
        /// 根据工厂id,修改当前正在使用的格子
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
         [OperationContract]
        int UpdateLatticePartitionState(LatticePartition models);

        /// <summary>
         /// 扫描产品code,成功返回订单信息，失败返回null
        /// </summary>
        /// <param name="code"></param>
        /// <param name="pid"></param>
        /// <param name="mess"></param>
        /// <returns></returns>
         [OperationContract]
         int ScanningOrderInfoCode(int OperateUid, int techId,string code, int pid,out Lattice latticemodel,out string mess);



        /// <summary>
         ///  清空格子
        /// </summary>
        /// <param name="LatticeID"></param>
        /// <param name="mess"></param>
        /// <returns></returns>
        [OperationContract]
         int emptyLattice(int LatticeID, out string mess);

        /// <summary>
        /// 根据订单ID获取当前订单信息
        /// </summary>
        /// <param name="orderid"></param>
        /// <param name="mess"></param>
        /// <returns></returns>
        [OperationContract]
        OrderBagInfo GetOrderBag(int orderid, out string mess);

         /// <summary>
         /// 根据各自id获取格子内容
         /// </summary>
         /// <param name="Latticeid"></param>
         /// <returns></returns>
        [OperationContract]
        Lattice GetLatticeInfo(int Latticeid);
    }
}
